package com.example.wyc.mybiye1;

import android.annotation.SuppressLint;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.wyc.mybiye.R;

/**
 * Created by wyc on 2018/11/8.
 */


@SuppressLint("ValidFragment")
public class MyFragment extends Fragment {
    int i;

    @SuppressLint("ValidFragment")
    public MyFragment(int i){
        this.i=i;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
       View view = null;
        if (i==1){
             view=inflater.inflate(R.layout.activity_ma1,container,false);
        }else if (i==2){
            view=inflater.inflate(R.layout.activity_ma2,container,false);
        }else if (i==3){
            view=inflater.inflate(R.layout.activity_ma3,container,false);
        }else if (i==4){
            view=inflater.inflate(R.layout.activity_ma4,container,false);
        }
        return view;
    }
}
